<%@ Page language="c#" Codebehind="StockRound.aspx.cs" AutoEventWireup="True" Inherits="_1856.UI.StockRound" smartNavigation="True"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title id="Title" method="post" runat="server">StockRound</title>
		<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
	</HEAD>
	<body bgColor="#99ffff" MS_POSITIONING="GridLayout">
		<form id="StockRound" method="post" runat="server">
			<asp:dropdownlist id="SellDDL" 
				style="Z-INDEX: 112; LEFT: 141px; POSITION: absolute; TOP: 46px" runat="server" 
				Width="50px" Height="18px">
				<asp:ListItem Value="1">1</asp:ListItem>
				<asp:ListItem Value="2">2</asp:ListItem>
				<asp:ListItem Value="3">3</asp:ListItem>
				<asp:ListItem Value="4">4</asp:ListItem>
				<asp:ListItem Value="5">5</asp:ListItem>
				<asp:ListItem Value="6">6</asp:ListItem>
				<asp:ListItem Value="7">7</asp:ListItem>
				<asp:ListItem Value="8">8</asp:ListItem>
				<asp:ListItem Value="9">9</asp:ListItem>
				<asp:ListItem Value="10">10</asp:ListItem>
				<asp:ListItem Value="11">11</asp:ListItem>
			</asp:dropdownlist>
			<asp:linkbutton id="ShowGameStatus" style="Z-INDEX: 115; LEFT: 348px; POSITION: absolute; TOP: 15px" runat="server" onclick="GameStatus_Click"> Show Game Status</asp:linkbutton><asp:label id="stockRoundError" style="Z-INDEX: 108; LEFT: 201px; POSITION: absolute; TOP: 52px" runat="server" Width="289px" Height="61px" Font-Bold="True" ForeColor="Red" Visible="False"></asp:label><asp:label id="Passes" style="Z-INDEX: 106; LEFT: 125px; POSITION: absolute; TOP: 90px" runat="server" Width="71px" Height="12px"># of Passes</asp:label><asp:listbox id="historyLB" style="Z-INDEX: 107; LEFT: 500px; POSITION: absolute; TOP: 46px" runat="server" Width="383px" Height="73px"></asp:listbox><asp:table id="GameInfoTable" style="Z-INDEX: 100; LEFT: 8px; POSITION: absolute; TOP: 126px" runat="server" Width="876px" Height="352px" ForeColor="Blue" GridLines="Both" BorderStyle="Solid" BorderWidth="1px" BorderColor="Blue">
				<asp:TableRow ForeColor="Blue" ID="Header" BackColor="#80FFFF">
					<asp:TableCell ForeColor="Blue" Font-Bold="True" ID="Player"></asp:TableCell>
					<asp:TableCell ForeColor="Blue" Text="Cash" ID="Cash"></asp:TableCell>
					<asp:TableCell ForeColor="Blue" Text="Privates" ID="PrivatesOwned"></asp:TableCell>
					<asp:TableCell Text="BBG" ID="BBG"></asp:TableCell>
					<asp:TableCell Text="CA" ID="CA"></asp:TableCell>
					<asp:TableCell Text="CPR" ID="CPR"></asp:TableCell>
					<asp:TableCell Text="CV" ID="CV"></asp:TableCell>
					<asp:TableCell Text="GT" ID="GT"></asp:TableCell>
					<asp:TableCell Text="GW" ID="GW"></asp:TableCell>
					<asp:TableCell Text="LPS" ID="LPS"></asp:TableCell>
					<asp:TableCell Text="TGB" ID="TGB"></asp:TableCell>
					<asp:TableCell Text="THB" ID="THB"></asp:TableCell>
					<asp:TableCell Text="WGB" ID="WGB"></asp:TableCell>
					<asp:TableCell Text="WR" ID="WR"></asp:TableCell>
					<asp:TableCell Text="CGR" ID="CGR"></asp:TableCell>
				</asp:TableRow>
				<asp:TableRow>
					<asp:TableCell Text="Bank / IPO Shares" ID="Bank"></asp:TableCell>
					<asp:TableCell Text="Bank's cash" ID="BankCash"></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell ID="bbgIPO"></asp:TableCell>
					<asp:TableCell ID="caIPO"></asp:TableCell>
					<asp:TableCell ID="cprIPO"></asp:TableCell>
					<asp:TableCell ID="cvIPO"></asp:TableCell>
					<asp:TableCell ID="gtIPO"></asp:TableCell>
					<asp:TableCell ID="gwIPO"></asp:TableCell>
					<asp:TableCell ID="lpsIPO"></asp:TableCell>
					<asp:TableCell ID="tgbIPO"></asp:TableCell>
					<asp:TableCell ID="thbIPO"></asp:TableCell>
					<asp:TableCell ID="wgbIPO"></asp:TableCell>
					<asp:TableCell ID="wrIPO"></asp:TableCell>
					<asp:TableCell ID="cgrIPO"></asp:TableCell>
				</asp:TableRow>
				<asp:TableRow>
					<asp:TableCell Text="Open Market" ID="OpenMarket"></asp:TableCell>
					<asp:TableCell ID="openMarketCash"></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell ID="bbgOpenMarket"></asp:TableCell>
					<asp:TableCell ID="caOpenMarket"></asp:TableCell>
					<asp:TableCell ID="cprOpenMarket"></asp:TableCell>
					<asp:TableCell ID="cvOpenMarket"></asp:TableCell>
					<asp:TableCell ID="gtOpenMarket"></asp:TableCell>
					<asp:TableCell ID="gwOpenMarket"></asp:TableCell>
					<asp:TableCell ID="lpsOpenMarket"></asp:TableCell>
					<asp:TableCell ID="tgbOpenMarket"></asp:TableCell>
					<asp:TableCell ID="thbOpenMarket"></asp:TableCell>
					<asp:TableCell ID="wgbOpenMarket"></asp:TableCell>
					<asp:TableCell ID="wrOpenMarket"></asp:TableCell>
					<asp:TableCell ID="cgrOpenMarket"></asp:TableCell>
				</asp:TableRow>
				<asp:TableRow>
					<asp:TableCell Text="Cash" ID="CompanyCash"></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell ID="bbgCash"></asp:TableCell>
					<asp:TableCell ID="caCash"></asp:TableCell>
					<asp:TableCell ID="cprCash"></asp:TableCell>
					<asp:TableCell ID="cvCash"></asp:TableCell>
					<asp:TableCell ID="gtCash"></asp:TableCell>
					<asp:TableCell ID="gwCash"></asp:TableCell>
					<asp:TableCell ID="lpsCash"></asp:TableCell>
					<asp:TableCell ID="tgbCash"></asp:TableCell>
					<asp:TableCell ID="thbCash"></asp:TableCell>
					<asp:TableCell ID="wgbCash"></asp:TableCell>
					<asp:TableCell ID="wrCash"></asp:TableCell>
					<asp:TableCell ID="cgrCash"></asp:TableCell>
				</asp:TableRow>
				<asp:TableRow>
					<asp:TableCell Text="Escrow" ID="CompanyEscrow"></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell ID="bbgEscrow"></asp:TableCell>
					<asp:TableCell ID="caEscrow"></asp:TableCell>
					<asp:TableCell ID="cprEscrow"></asp:TableCell>
					<asp:TableCell ID="cvEscrow"></asp:TableCell>
					<asp:TableCell ID="gtEscrow"></asp:TableCell>
					<asp:TableCell ID="gwEscrow"></asp:TableCell>
					<asp:TableCell ID="lpsEscrow"></asp:TableCell>
					<asp:TableCell ID="tgbEscrow"></asp:TableCell>
					<asp:TableCell ID="thbEscrow"></asp:TableCell>
					<asp:TableCell ID="wgbEscrow"></asp:TableCell>
					<asp:TableCell ID="wrEscrow"></asp:TableCell>
					<asp:TableCell ID="cgrEscrow"></asp:TableCell>
				</asp:TableRow>
				<asp:TableRow>
					<asp:TableCell Text="Loans" ID="Loans"></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell ID="bbgLoans"></asp:TableCell>
					<asp:TableCell ID="caLoans"></asp:TableCell>
					<asp:TableCell ID="cprLoans"></asp:TableCell>
					<asp:TableCell ID="cvLoans"></asp:TableCell>
					<asp:TableCell ID="gtLoans"></asp:TableCell>
					<asp:TableCell ID="gwLoans"></asp:TableCell>
					<asp:TableCell ID="lpsLoans"></asp:TableCell>
					<asp:TableCell ID="tgbLoans"></asp:TableCell>
					<asp:TableCell ID="thbLoans"></asp:TableCell>
					<asp:TableCell ID="wgbLoans"></asp:TableCell>
					<asp:TableCell ID="wrLoans"></asp:TableCell>
					<asp:TableCell ID="cgrLoans"></asp:TableCell>
				</asp:TableRow>
				<asp:TableRow>
					<asp:TableCell Text="Last Dividend" ID="LastDividend"></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell ID="bbgLastDividend"></asp:TableCell>
					<asp:TableCell ID="caLastDividend"></asp:TableCell>
					<asp:TableCell ID="cprLastDividend"></asp:TableCell>
					<asp:TableCell ID="cvLastDividend"></asp:TableCell>
					<asp:TableCell ID="gtLastDividend"></asp:TableCell>
					<asp:TableCell ID="gwLastDividend"></asp:TableCell>
					<asp:TableCell ID="lpsLastDividend"></asp:TableCell>
					<asp:TableCell ID="tgbLastDividend"></asp:TableCell>
					<asp:TableCell ID="thbLastDividend"></asp:TableCell>
					<asp:TableCell ID="wgbLastDividend"></asp:TableCell>
					<asp:TableCell ID="wrLastDividend"></asp:TableCell>
					<asp:TableCell ID="cgrLastDividend"></asp:TableCell>
				</asp:TableRow>
				<asp:TableRow>
					<asp:TableCell Text="Privates" ID="Privates"></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell ID="bbgPrivates"></asp:TableCell>
					<asp:TableCell ID="caPrivates"></asp:TableCell>
					<asp:TableCell ID="cprPrivates"></asp:TableCell>
					<asp:TableCell ID="cvPrivates"></asp:TableCell>
					<asp:TableCell ID="gtPrivates"></asp:TableCell>
					<asp:TableCell ID="gwPrivates"></asp:TableCell>
					<asp:TableCell ID="lpsPrivates"></asp:TableCell>
					<asp:TableCell ID="tgbPrivates"></asp:TableCell>
					<asp:TableCell ID="thbPrivates"></asp:TableCell>
					<asp:TableCell ID="wgbPrivates"></asp:TableCell>
					<asp:TableCell ID="wrPrivates"></asp:TableCell>
					<asp:TableCell ID="cgrPrivates"></asp:TableCell>
				</asp:TableRow>
				<asp:TableRow>
					<asp:TableCell Text="Trains" ID="Trains"></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell ID="bbgTrains"></asp:TableCell>
					<asp:TableCell ID="caTrains"></asp:TableCell>
					<asp:TableCell ID="cprTrains"></asp:TableCell>
					<asp:TableCell ID="cvTrains"></asp:TableCell>
					<asp:TableCell ID="gtTrains"></asp:TableCell>
					<asp:TableCell ID="gwTrains"></asp:TableCell>
					<asp:TableCell ID="lpsTrains"></asp:TableCell>
					<asp:TableCell ID="tgbTrains"></asp:TableCell>
					<asp:TableCell ID="thbTrains"></asp:TableCell>
					<asp:TableCell ID="wgbTrains"></asp:TableCell>
					<asp:TableCell ID="wrTrains"></asp:TableCell>
					<asp:TableCell ID="cgrTrains"></asp:TableCell>
				</asp:TableRow>
				<asp:TableRow>
					<asp:TableCell Text="Stations Played" ID="Stations"></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell ID="bbgStations"></asp:TableCell>
					<asp:TableCell ID="caStations"></asp:TableCell>
					<asp:TableCell ID="cprStations"></asp:TableCell>
					<asp:TableCell ID="cvStations"></asp:TableCell>
					<asp:TableCell ID="gtStations"></asp:TableCell>
					<asp:TableCell ID="gwStations"></asp:TableCell>
					<asp:TableCell ID="lpsStations"></asp:TableCell>
					<asp:TableCell ID="tgbStations"></asp:TableCell>
					<asp:TableCell ID="thbStations"></asp:TableCell>
					<asp:TableCell ID="wgbStations"></asp:TableCell>
					<asp:TableCell ID="wrStations"></asp:TableCell>
					<asp:TableCell ID="cgrStations"></asp:TableCell>
				</asp:TableRow>
				<asp:TableRow>
					<asp:TableCell Text="Notes" ID="Notes"></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell ID="bbgNotes"></asp:TableCell>
					<asp:TableCell ID="caNotes"></asp:TableCell>
					<asp:TableCell ID="cprNotes"></asp:TableCell>
					<asp:TableCell ID="cvNotes"></asp:TableCell>
					<asp:TableCell ID="gtNotes"></asp:TableCell>
					<asp:TableCell ID="gwNotes"></asp:TableCell>
					<asp:TableCell ID="lpsNotes"></asp:TableCell>
					<asp:TableCell ID="tgbNotes"></asp:TableCell>
					<asp:TableCell ID="thbNotes"></asp:TableCell>
					<asp:TableCell ID="wgbNotes"></asp:TableCell>
					<asp:TableCell ID="wrNotes"></asp:TableCell>
					<asp:TableCell ID="cgrNotes"></asp:TableCell>
				</asp:TableRow>
				<asp:TableRow>
					<asp:TableCell Text="Stock Market Value" ID="CurrentValue"></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell ID="bbgCurrentValue"></asp:TableCell>
					<asp:TableCell ID="caCurrentValue"></asp:TableCell>
					<asp:TableCell ID="cprCurrentValue"></asp:TableCell>
					<asp:TableCell ID="cvCurrentValue"></asp:TableCell>
					<asp:TableCell ID="gtCurrentValue"></asp:TableCell>
					<asp:TableCell ID="gwCurrentValue"></asp:TableCell>
					<asp:TableCell ID="lpsCurrentValue"></asp:TableCell>
					<asp:TableCell ID="tgbCurrentValue"></asp:TableCell>
					<asp:TableCell ID="thbCurrentValue"></asp:TableCell>
					<asp:TableCell ID="wgbCurrentValue"></asp:TableCell>
					<asp:TableCell ID="wrCurrentValue"></asp:TableCell>
					<asp:TableCell ID="cgrCurrentValue"></asp:TableCell>
				</asp:TableRow>
				<asp:TableRow>
					<asp:TableCell Text="Par Price" ID="ParPrice"></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell></asp:TableCell>
					<asp:TableCell ID="bbgParPrice"></asp:TableCell>
					<asp:TableCell ID="caParPrice"></asp:TableCell>
					<asp:TableCell ID="cprParPrice"></asp:TableCell>
					<asp:TableCell ID="cvParPrice"></asp:TableCell>
					<asp:TableCell ID="gtParPrice"></asp:TableCell>
					<asp:TableCell ID="gwParPrice"></asp:TableCell>
					<asp:TableCell ID="lpsParPrice"></asp:TableCell>
					<asp:TableCell ID="tgbParPrice"></asp:TableCell>
					<asp:TableCell ID="thbParPrice"></asp:TableCell>
					<asp:TableCell ID="wgbParPrice"></asp:TableCell>
					<asp:TableCell ID="wrParPrice"></asp:TableCell>
					<asp:TableCell ID="cgrParPrice"></asp:TableCell>
				</asp:TableRow>
			</asp:table>
			<asp:label id="Label3" 
				style="Z-INDEX: 104; LEFT: 501px; POSITION: absolute; TOP: 13px;width: 119px;" 
				runat="server" Height="20">Player's turn:</asp:label>
			<asp:label id="currentPlayersTurn" 
				style="Z-INDEX: 103; LEFT: 631px; POSITION: absolute; TOP: 12px;width: 181px;" 
				runat="server" Height="20" Font-Bold="True" ForeColor="Red" Font-Size="Medium">Current Player's Turn</asp:label>
			<asp:dropdownlist id="PriceDDL" 
				style="Z-INDEX: 101; LEFT: 133px; POSITION: absolute; TOP: 16px" runat="server" 
				Width="60px" Height="18px">
				<asp:ListItem Value="100">100</asp:ListItem>
				<asp:ListItem Value="90">90</asp:ListItem>
				<asp:ListItem Value="80">80</asp:ListItem>
				<asp:ListItem Value="75">75</asp:ListItem>
				<asp:ListItem Value="70">70</asp:ListItem>
				<asp:ListItem Value="65">65</asp:ListItem>
			</asp:dropdownlist><asp:button id="pbPass" style="Z-INDEX: 102; LEFT: 70px; POSITION: absolute; TOP: 88px" runat="server" Text="Pass" Width="41px" Height="22px" onclick="pbPass_Click"></asp:button><asp:button id="pbDone" style="Z-INDEX: 109; LEFT: 17px; POSITION: absolute; TOP: 88px" runat="server" Text="Done" Width="40px" Height="23px" onclick="pbDone_Click"></asp:button><asp:linkbutton id="ShowStockMarket" style="Z-INDEX: 110; LEFT: 206px; POSITION: absolute; TOP: 16px" runat="server" onclick="StockMarket_Click"> Show Stock Market</asp:linkbutton>
			<asp:Label id="Label1" 
				style="Z-INDEX: 113; LEFT: 18px; POSITION: absolute; TOP: 49px;width: 132px;" 
				runat="server" Height="21px" ForeColor="Magenta">Shares to sell:</asp:Label>
			<asp:Label id="Label2" 
                style="Z-INDEX: 114; LEFT: 57px; POSITION: absolute; TOP: 18px;width: 102px;" 
                runat="server" Height="22px" ForeColor="Magenta">Par price:</asp:Label>
            <asp:Button ID="UndoPB" runat="server" onclick="UndoPB_Click" Text="Undo" 
                Width="39px" />
            <asp:checkbox id="PriorityCheckBox" 
				style="Z-INDEX: 105; LEFT: 910px; POSITION: absolute; TOP: 17px" runat="server" 
				Text="Priority" Width="91px" Height="15px" TextAlign="Left"></asp:checkbox>
			<asp:CheckBox ID="PermaPass" 
			style="Z-INDEX: 105; LEFT: 808px; POSITION: absolute; TOP: 15px" 
			runat="server"
			Text="PermaPass" Width="91px" Height="15px" TextAlign="Left" AutoPostBack="True" 
                oncheckedchanged="PermaPass_CheckedChanged1" />
        </form>
		<script language="javascript">
			function GetPriority ()
			{
				return document.StockRound.PriorityCheckBox.checked;
			}

			var bPriority = GetPriority ()
			
    		if (!bPriority)
    		{
    		    setInterval ("timer()", 2000);
            } 
                   
        function ReceiveServerData(rValue)
        {
            if (rValue == 'refresh')
            {
                window.navigate ("StockRound.aspx"); // Initial works 11.17.2007
            }
            else if (rValue == 'Operating Round')
            {
                window.navigate ("OperatingRound2.aspx");
            }
        }
    		 
        function timer()
        {
            CallServer("Get Update State", "CallServer function");
        }
        		
		function init()
        {
    		var bPriority = GetPriority ()
        }
            
		</script>
	</body>
</HTML>
